package com.yifeixi.validation.controller;

import static com.yifeixi.validation.controller.CarController.REQUEST_BODY_MAPPING_PATH;

import com.yifeixi.validation.entity.Car;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 汽车管理
 *
 * @author YiFeiXi
 */
@RequestMapping(REQUEST_BODY_MAPPING_PATH)
@RestController
public class CarController {

  static final String REQUEST_BODY_MAPPING_PATH = "/car";

  @PostMapping
  public boolean save(@RequestBody @Validated Car car) {
    return true;
  }
}
